package com.example.swagger.entity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
@Data
public class BookEntity  implements Serializable {
    private static final long serialVersionUID = -5514139686858156155L;
    private Integer id;
    private String name;
    private boolean isOnSale;
    private float price;
//    进行日期格式转换
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publish_date;
    private String author_name;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isOnSale() {
        return isOnSale;
    }

    public void setIsOnSale(boolean onSale) {
        isOnSale = isOnSale;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public Date getPublish_date() {
        return publish_date;
    }

    public void setPublish_date(Date publish_date) {
        this.publish_date = publish_date;
    }

    public String getAuthor_name() {
        return author_name;
    }

    public void setAuthor_name(String author_name) {
        this.author_name = author_name;
    }

}
